package com.cweb.admin.model.demo.mapper;

import com.cweb.admin.model.demo.entity.DynamicDatabases;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DynamicDatabasesMapper {

    List<DynamicDatabases> showDatabases();

    @Select("SELECT * FROM dynamicdatabases")
    List<DynamicDatabases> find();

    @Insert("INSERT INTO dynamicdatabases(databaseName) VALUES(#{databaseName})")
    int insert(@Param("databaseName") String databaseName);

}
